package com.ttx.pattern.example.singleton.after;

/**
 * 饿汉模式
 * @author TimFruit
 * @date 19-10-20 下午5:17
 */
public class Singleton1 {

    private static final Singleton1 instance=new Singleton1(); // 类加载时就实例化

    private Singleton1(){}  //私有构造函数

    public static Singleton1 getInstance(){
        return instance;
    }



}
